﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FifaChamps.API.Data
{
    public class Player
    {
        public int PlayerID { get; private set; }
        public string Name { get; private set; }
        public string Surname { get; private set; }
        public string Email { get; private set; }
        public string Phone { get; private set; }
        public string NickName { get; private set; }
        public string Online { get; private set; }
        public int? FirstTeam { get; private set; }
        public int? SecondTeam { get; private set; }
        public string Picture { get; private set; }
        public DateTime? Joindate { get; private set; }
        public bool? Registered { get; private set; }

        internal Player()
        { }

        private Player(int playerid, string name, string surname, string email, string phone, string nickname, string online, int? firstteam, int? secondteam, string playerpicture, DateTime? joindate, bool? registered)
        {
            PlayerID = playerid;
            Name = name;
            Surname = surname;
            Email = email;
            Phone = phone;
            NickName = nickname;
            Online = online;
            FirstTeam = firstteam;
            SecondTeam = secondteam;
            Picture = playerpicture;
            Joindate = joindate;
            Registered = registered;
        }

        internal static Player Factory(int playerid, string name, string surname, string email, string phone, string nickname, string online, int? firstteam, int? secondteam, string playerpicture, DateTime? joindate, bool? registered)
        {
            return new Player(playerid, name, surname, email, phone, nickname, online, firstteam, secondteam, playerpicture, joindate, registered);
        }
    }
}
